package scala.exception

/**
 * 异常
 */
object ExceptionTest1 {
  def main(args: Array[String]): Unit = {
    try{
      val a = 22 / 0
    } catch {
      case e: ArithmeticException => println("算数异常")
      case e: Exception => println("其他异常")
    }finally {
      println("运行结束")
    }
  }
}
